﻿//-----------------------------------------------------------------------
// <copyright file="Var.cs" company="tuliprules.org">
//     Copyright (c) 2011 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Var class.</summary>
//-----------------------------------------------------------------------
namespace Tulip.Rules.Models.Rif.Core
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a logic variable.
    /// </summary>
    [Serializable]
    [DesignerCategory(@"code")]
    [XmlType(AnonymousType = true, Namespace = "http://www.w3.org/2007/rif#")]
    [XmlRoot(Namespace = "http://www.w3.org/2007/rif#", IsNullable = false)]
    public class Var : Irimeta, IRifCoreElement
    {
        /// <summary>
        /// The text field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private List<string> textField;

        /// <summary>
        /// Initializes a new instance of the <see cref="Var"/> class. 
        /// </summary>
        public Var()
        {
            this.textField = new List<string>();
        }

        /// <summary>
        /// Gets or sets the text for mixed type.
        /// </summary>
        [XmlTextAttribute]
        public List<string> Text
        {
            get
            {
                return this.textField;
            }

            set
            {
                this.textField = value;
            }
        }
    }
}
